package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"tiktok/api/internal/config"
	"tiktok/rpc/tiktok"
)

type ServiceContext struct {
	Config config.Config
	//AuthToken rest.Middleware
	TiktokSrv tiktok.Tiktok
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		//AuthToken: middleware.NewAuthTokenMiddleware().Handle,
		TiktokSrv: tiktok.NewTiktok(zrpc.MustNewClient(c.TiktokSrv)),
	}
}
